package com.zzy.service;

import com.zzy.dao.EmailDao;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

/**
 * @Author: zhangzhenyu
 * @Date: 2021/2/5
 */
@Service
public class EmailServiceImpl implements EmailService{
    @Autowired
    private EmailDao emailDao;

    @Override
    public boolean sendEmail(String email, String code) {

        //模拟发送邮件
        emailDao.sendEmail(code,email,new Date());
        System.out.println("邮件发送成功！ code为"+code);



        return true;
    }
}
